<template>
	<om-page :title="pageTitle">
	  <view class="om_hd_fix">
		  <om-topsearch @confirm="confirm"></om-topsearch>
	  </view>
	   <view class="page__bd" style="padding-top: 100rpx;">
		   <uni-list>
				<view v-for="(item, index) in commonData.datas" :key="index">
					<uni-list-item 
					:showArrow="false" 
					:title="item.userName" 
					:note="(item.instName?item.instName:'') +'-'+ (item.salaryPosName?item.salaryPosName:'')">
						<view slot="footer">
						  <view>{{item.startTime + " - " + item.endTime}}</view>
						  <view class="footer-cls">{{item.salaryHandleName}}</view>
						</view>
					</uni-list-item>
				</view>
		   </uni-list>
	  </view>
	   <tui-loadmore :visible="commonData.loadding"></tui-loadmore>
	   <tui-nomore :visible="!commonData.pullUpOn"></tui-nomore>
	   <tui-scroll-top :scrollTop="scrollTop" style="background: rgba(124, 174, 255, 0.5)"></tui-scroll-top>
	</om-page>
</template>

<script>
	import listLoad from '../../../static/js/listLoad.js';
	const app = getApp()
	export default {
		data() {
			return {
				logoColors: app.globalData.logoColors,
				scrollTop: 0,
				commonData:[],
				pageTitle:""
			}
		},
		onLoad(options) {
			let _that = this
			this.pageTitle = options.title || "今日加班"
			uni.setNavigationBarTitle({
			  title: this.pageTitle
			})
			listLoad.initData(this,"wxOverTime/getTodayList")
		},
		onPageScroll(e) {
			this.scrollTop = e.scrollTop;
		},
		//页面相关事件处理函数--监听用户下拉动作
		onPullDownRefresh: function() {
			listLoad.pullDownRefresh(this)
		},
		
		// 页面上拉触底事件的处理函数
		onReachBottom: function() {
			listLoad.reachBottom(this)
		}
	}
</script>

<style>
.footer-cls{
  font-size: 24rpx;
}
</style>
